package com.example.patient.utils;

import cn.hutool.core.util.StrUtil;

/**
 * @Author wxy
 * @Date 2021/1/19 19:40
 * @Version 1.0
 */
public final class PatientUtils {

    public static String getString(String input) {
        String Output = "";
        switch (input.length()) {
            case 1:
                Output = "*";
                break;
            case 2:
                Output = StrUtil.hide(input, 1, 2);
                break;
            case 0:
                Output = "";
                break;
            default:
                Output = StrUtil.hide(input, 1, input.length() - 1);
                break;
        }
        return Output;
    }
}
